package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.domain.entity.system.SysJishi;
import com.ruoyi.system.mapper.SysJishiMapper;
import com.ruoyi.system.service.ISysJishiService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 计时收费规则Service业务层处理
 *
 * @author zjw
 * @date 2023-08-04
 */
@Service
public class SysJishiServiceImpl implements ISysJishiService {
    @Resource
    private SysJishiMapper sysJishiMapper;

    /**
     * 查询计时收费规则
     *
     * @param jishiId 计时收费规则主键
     * @return 计时收费规则
     */
    @Override
    public SysJishi selectSysJishiByJishiId(int jishiId) {
        return sysJishiMapper.selectSysJishiByJishiId(jishiId);
    }

    /**
     * 查询计时收费规则列表
     *
     * @param sysJishi 计时收费规则
     * @return 计时收费规则
     */
    @Override
    public List<SysJishi> selectSysJishiList(SysJishi sysJishi) {
        return sysJishiMapper.selectSysJishiList(sysJishi);
    }

    /**
     * 新增计时收费规则
     *
     * @param sysJishi 计时收费规则
     * @return 结果
     */
    @Override
    public int insertSysJishi(SysJishi sysJishi) {
        return sysJishiMapper.insertSysJishi(sysJishi);
    }

    /**
     * 修改计时收费规则
     *
     * @param sysJishi 计时收费规则
     * @return 结果
     */
    @Override
    public int updateSysJishi(SysJishi sysJishi) {
        return sysJishiMapper.updateSysJishi(sysJishi);
    }

    /**
     * 批量删除计时收费规则
     *
     * @param jishiIds 需要删除的计时收费规则主键
     * @return 结果
     */
    @Override
    public int deleteSysJishiByJishiIds(Long[] jishiIds) {
        return sysJishiMapper.deleteSysJishiByJishiIds(jishiIds);
    }

    /**
     * 删除计时收费规则信息
     *
     * @param jishiId 计时收费规则主键
     * @return 结果
     */
    @Override
    public int deleteSysJishiByJishiId(Long jishiId) {
        return sysJishiMapper.deleteSysJishiByJishiId(jishiId);
    }

    @Override
    public SysJishi selectSysJishiByScenicId(Long scenicId) {
        return sysJishiMapper.selectSysJishiByScenicId(scenicId);
    }
}
